package com.manshu.manshuweb.common;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import java.util.Set;

@Slf4j
@Component
@Order(2)
public class MyApplicationRunner2 implements ApplicationRunner {
    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("MyApplicationRunner2 "+args);
       /* log.info("MyApplicationRunner2 "+args.getNonOptionArgs());
        log.info("MyApplicationRunner2 "+args.getOptionNames());
        Set<String> keys=args.getOptionNames();
        for(String key:keys){
            log.info("MyApplicationRunner2 key"+key+" value:"+args.getOptionValues(key));
        }*/
    }
}
